﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MyBlog.Unity
{
    public class CustomControllerActivator:IControllerActivator
    {
        public IController Create(System.Web.Routing.RequestContext requestContext, Type controllerType)
        {
            var controller = DependencyResolver.Current.GetService(controllerType) as IController;
            return controller;
        } 
    }
}